package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DeviceStateMapper;
import com.ruoyi.system.domain.DeviceState;
import com.ruoyi.system.service.IDeviceStateService;

/**
 * 设备状态Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-10
 */
@Service
public class DeviceStateServiceImpl implements IDeviceStateService 
{
    @Autowired
    private DeviceStateMapper deviceStateMapper;

    /**
     * 查询设备状态
     * 
     * @param id 设备状态主键
     * @return 设备状态
     */
    @Override
    public DeviceState selectDeviceStateById(Long id)
    {
        return deviceStateMapper.selectDeviceStateById(id);
    }

    /**
     * 查询设备状态列表
     * 
     * @param deviceState 设备状态
     * @return 设备状态
     */
    @Override
    public List<DeviceState> selectDeviceStateList(DeviceState deviceState)
    {
        return deviceStateMapper.selectDeviceStateList(deviceState);
    }

    /**
     * 新增设备状态
     * 
     * @param deviceState 设备状态
     * @return 结果
     */
    @Override
    public int insertDeviceState(DeviceState deviceState)
    {
        return deviceStateMapper.insertDeviceState(deviceState);
    }

    /**
     * 修改设备状态
     * 
     * @param deviceState 设备状态
     * @return 结果
     */
    @Override
    public int updateDeviceState(DeviceState deviceState)
    {
        return deviceStateMapper.updateDeviceState(deviceState);
    }

    /**
     * 批量删除设备状态
     * 
     * @param ids 需要删除的设备状态主键
     * @return 结果
     */
    @Override
    public int deleteDeviceStateByIds(Long[] ids)
    {
        return deviceStateMapper.deleteDeviceStateByIds(ids);
    }

    /**
     * 删除设备状态信息
     * 
     * @param id 设备状态主键
     * @return 结果
     */
    @Override
    public int deleteDeviceStateById(Long id)
    {
        return deviceStateMapper.deleteDeviceStateById(id);
    }
}
